<script setup lang="ts">
    import { ref } from 'vue'
    import { useRoute, useRouter } from 'vue-router'
    import Profile from '../components/Profile/index.vue'
    import { ElLoading } from 'element-plus'
    const route = useRoute();
    const router = useRouter()
    const id = ref(route.params.id as string)
    //FIXME:更多  loading的问题  王杰  康露露 9.14
    const toHome = () => {
        const loading = ElLoading.service({
            lock: true,
            text: 'Loading',
            spinner: 'el-icon-loading',
            background: 'rgba(0, 0, 0, 0.7)',
        });
        setTimeout(() => {
            loading.close();
            router.push({
                name: 'Home'
            })
        }, 500);
    }
</script>
<template>
    <!--TODO： 生成口令 （预约某个人）张燕龙 王杰 9.15 -->
    <div class="more">
        <el-link @click="toHome">
            <i class="el-icon-view el-icon--right"></i>
            更多
        </el-link>
    </div>
    <div>
        <!--TODO： 单独的路由 路由跳转完善：loading问题 王杰 党建 9.14 -->
        <profile :id="id" />
    </div>
</template>

<style scoped>
    .more {
        /* background-color: rgb(253, 203, 203); */
        color: rgb(247, 245, 245);
        position: absolute;
        float: left;
        right: 10px;
        top: 5px;
    }

    .el-link,
    .el-link--default {
        color: rgb(192, 181, 181);
    }
</style>